<template>
  <div class="about">
  <van-nav-bar
  title="首页"
  left-text="返回"
  left-arrow
  @click-left="$router.push('/')"
/>
<van-search v-model="value" placeholder="输入任务名称" />
<van-button type="primary" block @click="add">新增</van-button>
  </div>
</template>
<script setup>
import { useRouter } from 'vue-router'
import { ref } from 'vue';
import {useCounterStore} from '../stores/counter'
var $router = useRouter()
const value = ref('');
var store=useCounterStore()
var add=()=>{
  store.xinzeng(value.value)
  value.value=''
  $router.push('/')
}
</script>
<style scoped>
.about{
  padding: 10px;
}

</style>
